3.3.35 \(\int \frac {\cot ^4(e+f x)}{(a+b \tan ^2(e+f x))^2} \, dx\) [235]

Optimal. Leaf size=169 \[ \frac {x}{(a-b)^2}-\frac {(7 a-5 b) b^{5/2} \text {ArcTan}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{2 a^{7/2} (a-b)^2 f}+\frac {\left (2 a^2+2 a b-5 b^2\right ) \cot (e+f x)}{2 a^3 (a-b) f}-\frac {(2 a-5 b) \cot ^3(e+f x)}{6 a^2 (a-b) f}-\frac {b \cot ^3(e+f x)}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )} \]

[Out]

x/(a-b)^2-1/2*(7*a-5*b)*b^(5/2)*arctan(b^(1/2)*tan(f*x+e)/a^(1/2))/a^(7/2)/(a-b)^2/f+1/2*(2*a^2+2*a*b-5*b^2)*c
ot(f*x+e)/a^3/(a-b)/f-1/6*(2*a-5*b)*cot(f*x+e)^3/a^2/(a-b)/f-1/2*b*cot(f*x+e)^3/a/(a-b)/f/(a+b*tan(f*x+e)^2)

________________________________________________________________________________________

Rubi [A]
time = 0.19, antiderivative size = 169, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3751, 483, 597, 536, 209, 211} \begin {gather*} -\frac {b^{5/2} (7 a-5 b) \text {ArcTan}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{2 a^{7/2} f (a-b)^2}-\frac {(2 a-5 b) \cot ^3(e+f x)}{6 a^2 f (a-b)}+\frac {\left (2 a^2+2 a b-5 b^2\right ) \cot (e+f x)}{2 a^3 f (a-b)}-\frac {b \cot ^3(e+f x)}{2 a f (a-b) \left (a+b \tan ^2(e+f x)\right )}+\frac {x}{(a-b)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^4/(a + b*Tan[e + f*x]^2)^2,x]

[Out]

x/(a - b)^2 - ((7*a - 5*b)*b^(5/2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]])/(2*a^(7/2)*(a - b)^2*f) + ((2*a^2 +
 2*a*b - 5*b^2)*Cot[e + f*x])/(2*a^3*(a - b)*f) - ((2*a - 5*b)*Cot[e + f*x]^3)/(6*a^2*(a - b)*f) - (b*Cot[e +
f*x]^3)/(2*a*(a - b)*f*(a + b*Tan[e + f*x]^2))

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 483

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(-b)*(e*
x)^(m + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*e*n*(b*c - a*d)*(p + 1))), x] + Dist[1/(a*n*(b*c - a*d)
*(p + 1)), Int[(e*x)^m*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*b*(m + 1) + n*(b*c - a*d)*(p + 1) + d*b*(m + n
*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, m, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LtQ
[p, -1] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 536

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 597

Int[((g_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)),
x_Symbol] :> Simp[e*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*c*g*(m + 1))), x] + Dist[1/(a*c*
g^n*(m + 1)), Int[(g*x)^(m + n)*(a + b*x^n)^p*(c + d*x^n)^q*Simp[a*f*c*(m + 1) - e*(b*c + a*d)*(m + n + 1) - e
*n*(b*c*p + a*d*q) - b*e*d*(m + n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p, q}, x] &&
 IGtQ[n, 0] && LtQ[m, -1]

Rule 3751

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[c*(ff/f), Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2
 + ff^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rubi steps

\begin {align*} \int \frac {\cot ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{x^4 \left (1+x^2\right ) \left (a+b x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {b \cot ^3(e+f x)}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )}+\frac {\text {Subst}\left (\int \frac {2 a-5 b-5 b x^2}{x^4 \left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{2 a (a-b) f}\\ &=-\frac {(2 a-5 b) \cot ^3(e+f x)}{6 a^2 (a-b) f}-\frac {b \cot ^3(e+f x)}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )}-\frac {\text {Subst}\left (\int \frac {3 \left (2 a^2+2 a b-5 b^2\right )+3 (2 a-5 b) b x^2}{x^2 \left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{6 a^2 (a-b) f}\\ &=\frac {\left (2 a^2+2 a b-5 b^2\right ) \cot (e+f x)}{2 a^3 (a-b) f}-\frac {(2 a-5 b) \cot ^3(e+f x)}{6 a^2 (a-b) f}-\frac {b \cot ^3(e+f x)}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )}+\frac {\text {Subst}\left (\int \frac {3 \left (2 a^3+2 a^2 b+2 a b^2-5 b^3\right )+3 b \left (2 a^2+2 a b-5 b^2\right ) x^2}{\left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{6 a^3 (a-b) f}\\ &=\frac {\left (2 a^2+2 a b-5 b^2\right ) \cot (e+f x)}{2 a^3 (a-b) f}-\frac {(2 a-5 b) \cot ^3(e+f x)}{6 a^2 (a-b) f}-\frac {b \cot ^3(e+f x)}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )}+\frac {\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{(a-b)^2 f}-\frac {\left ((7 a-5 b) b^3\right ) \text {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\tan (e+f x)\right )}{2 a^3 (a-b)^2 f}\\ &=\frac {x}{(a-b)^2}-\frac {(7 a-5 b) b^{5/2} \tan ^{-1}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{2 a^{7/2} (a-b)^2 f}+\frac {\left (2 a^2+2 a b-5 b^2\right ) \cot (e+f x)}{2 a^3 (a-b) f}-\frac {(2 a-5 b) \cot ^3(e+f x)}{6 a^2 (a-b) f}-\frac {b \cot ^3(e+f x)}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 2.41, size = 137, normalized size = 0.81 \begin {gather*} \frac {\frac {3 b^{5/2} (-7 a+5 b) \text {ArcTan}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{a^{7/2} (a-b)^2}-\frac {2 \cot (e+f x) \left (-4 a-6 b+a \csc ^2(e+f x)\right )}{a^3}+\frac {3 \left (2 (e+f x)-\frac {(a-b) b^3 \sin (2 (e+f x))}{a^3 (a+b+(a-b) \cos (2 (e+f x)))}\right )}{(a-b)^2}}{6 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[e + f*x]^4/(a + b*Tan[e + f*x]^2)^2,x]

[Out]

((3*b^(5/2)*(-7*a + 5*b)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]])/(a^(7/2)*(a - b)^2) - (2*Cot[e + f*x]*(-4*a -
 6*b + a*Csc[e + f*x]^2))/a^3 + (3*(2*(e + f*x) - ((a - b)*b^3*Sin[2*(e + f*x)])/(a^3*(a + b + (a - b)*Cos[2*(
e + f*x)]))))/(a - b)^2)/(6*f)

________________________________________________________________________________________

Maple [A]
time = 0.42, size = 126, normalized size = 0.75

method result size
derivativedivides \(\frac {-\frac {b^{3} \left (\frac {\left (\frac {a}{2}-\frac {b}{2}\right ) \tan \left (f x +e \right )}{a +b \left (\tan ^{2}\left (f x +e \right )\right )}+\frac {\left (7 a -5 b \right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{2 \sqrt {a b}}\right )}{a^{3} \left (a -b \right )^{2}}-\frac {1}{3 a^{2} \tan \left (f x +e \right )^{3}}-\frac {-a -2 b}{a^{3} \tan \left (f x +e \right )}+\frac {\arctan \left (\tan \left (f x +e \right )\right )}{\left (a -b \right )^{2}}}{f}\) \(126\)
default \(\frac {-\frac {b^{3} \left (\frac {\left (\frac {a}{2}-\frac {b}{2}\right ) \tan \left (f x +e \right )}{a +b \left (\tan ^{2}\left (f x +e \right )\right )}+\frac {\left (7 a -5 b \right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{2 \sqrt {a b}}\right )}{a^{3} \left (a -b \right )^{2}}-\frac {1}{3 a^{2} \tan \left (f x +e \right )^{3}}-\frac {-a -2 b}{a^{3} \tan \left (f x +e \right )}+\frac {\arctan \left (\tan \left (f x +e \right )\right )}{\left (a -b \right )^{2}}}{f}\) \(126\)
risch \(\frac {x}{a^{2}-2 a b +b^{2}}+\frac {i \left (12 a^{4} {\mathrm e}^{8 i \left (f x +e \right )}-24 a^{3} b \,{\mathrm e}^{8 i \left (f x +e \right )}+21 a \,b^{3} {\mathrm e}^{8 i \left (f x +e \right )}-15 b^{4} {\mathrm e}^{8 i \left (f x +e \right )}+12 a^{4} {\mathrm e}^{6 i \left (f x +e \right )}+12 a^{3} b \,{\mathrm e}^{6 i \left (f x +e \right )}-12 a^{2} b^{2} {\mathrm e}^{6 i \left (f x +e \right )}-54 a \,b^{3} {\mathrm e}^{6 i \left (f x +e \right )}+60 b^{4} {\mathrm e}^{6 i \left (f x +e \right )}-4 a^{4} {\mathrm e}^{4 i \left (f x +e \right )}-60 a^{3} b \,{\mathrm e}^{4 i \left (f x +e \right )}+60 a^{2} b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+76 a \,b^{3} {\mathrm e}^{4 i \left (f x +e \right )}-90 b^{4} {\mathrm e}^{4 i \left (f x +e \right )}+4 a^{4} {\mathrm e}^{2 i \left (f x +e \right )}+20 a^{3} b \,{\mathrm e}^{2 i \left (f x +e \right )}-4 a^{2} b^{2} {\mathrm e}^{2 i \left (f x +e \right )}-74 a \,b^{3} {\mathrm e}^{2 i \left (f x +e \right )}+60 b^{4} {\mathrm e}^{2 i \left (f x +e \right )}+8 a^{4}-12 a^{3} b -12 a^{2} b^{2}+31 a \,b^{3}-15 b^{4}\right )}{3 f \,a^{3} \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{3} \left (a -b \right )^{2} \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}-b \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+2 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a -b \right )}+\frac {7 \sqrt {-a b}\, b^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right )}{4 a^{3} \left (a -b \right )^{2} f}-\frac {5 \sqrt {-a b}\, b^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right )}{4 a^{4} \left (a -b \right )^{2} f}-\frac {7 \sqrt {-a b}\, b^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right )}{4 a^{3} \left (a -b \right )^{2} f}+\frac {5 \sqrt {-a b}\, b^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right )}{4 a^{4} \left (a -b \right )^{2} f}\) \(644\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^4/(a+b*tan(f*x+e)^2)^2,x,method=_RETURNVERBOSE)

[Out]

1/f*(-b^3/a^3/(a-b)^2*((1/2*a-1/2*b)*tan(f*x+e)/(a+b*tan(f*x+e)^2)+1/2*(7*a-5*b)/(a*b)^(1/2)*arctan(b*tan(f*x+
e)/(a*b)^(1/2)))-1/3/a^2/tan(f*x+e)^3-(-a-2*b)/a^3/tan(f*x+e)+1/(a-b)^2*arctan(tan(f*x+e)))

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 199, normalized size = 1.18 \begin {gather*} -\frac {\frac {3 \, {\left (7 \, a b^{3} - 5 \, b^{4}\right )} \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )}{{\left (a^{5} - 2 \, a^{4} b + a^{3} b^{2}\right )} \sqrt {a b}} - \frac {3 \, {\left (2 \, a^{2} b + 2 \, a b^{2} - 5 \, b^{3}\right )} \tan \left (f x + e\right )^{4} - 2 \, a^{3} + 2 \, a^{2} b + 2 \, {\left (3 \, a^{3} + 2 \, a^{2} b - 5 \, a b^{2}\right )} \tan \left (f x + e\right )^{2}}{{\left (a^{4} b - a^{3} b^{2}\right )} \tan \left (f x + e\right )^{5} + {\left (a^{5} - a^{4} b\right )} \tan \left (f x + e\right )^{3}} - \frac {6 \, {\left (f x + e\right )}}{a^{2} - 2 \, a b + b^{2}}}{6 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^4/(a+b*tan(f*x+e)^2)^2,x, algorithm="maxima")

[Out]

-1/6*(3*(7*a*b^3 - 5*b^4)*arctan(b*tan(f*x + e)/sqrt(a*b))/((a^5 - 2*a^4*b + a^3*b^2)*sqrt(a*b)) - (3*(2*a^2*b
 + 2*a*b^2 - 5*b^3)*tan(f*x + e)^4 - 2*a^3 + 2*a^2*b + 2*(3*a^3 + 2*a^2*b - 5*a*b^2)*tan(f*x + e)^2)/((a^4*b -
 a^3*b^2)*tan(f*x + e)^5 + (a^5 - a^4*b)*tan(f*x + e)^3) - 6*(f*x + e)/(a^2 - 2*a*b + b^2))/f

________________________________________________________________________________________

Fricas [A]
time = 4.79, size = 620, normalized size = 3.67 \begin {gather*} \left [\frac {24 \, a^{3} b f x \tan \left (f x + e\right )^{5} + 24 \, a^{4} f x \tan \left (f x + e\right )^{3} + 12 \, {\left (2 \, a^{3} b - 7 \, a b^{3} + 5 \, b^{4}\right )} \tan \left (f x + e\right )^{4} - 8 \, a^{4} + 16 \, a^{3} b - 8 \, a^{2} b^{2} + 8 \, {\left (3 \, a^{4} - a^{3} b - 7 \, a^{2} b^{2} + 5 \, a b^{3}\right )} \tan \left (f x + e\right )^{2} - 3 \, {\left ({\left (7 \, a b^{3} - 5 \, b^{4}\right )} \tan \left (f x + e\right )^{5} + {\left (7 \, a^{2} b^{2} - 5 \, a b^{3}\right )} \tan \left (f x + e\right )^{3}\right )} \sqrt {-\frac {b}{a}} \log \left (\frac {b^{2} \tan \left (f x + e\right )^{4} - 6 \, a b \tan \left (f x + e\right )^{2} + a^{2} + 4 \, {\left (a b \tan \left (f x + e\right )^{3} - a^{2} \tan \left (f x + e\right )\right )} \sqrt {-\frac {b}{a}}}{b^{2} \tan \left (f x + e\right )^{4} + 2 \, a b \tan \left (f x + e\right )^{2} + a^{2}}\right )}{24 \, {\left ({\left (a^{5} b - 2 \, a^{4} b^{2} + a^{3} b^{3}\right )} f \tan \left (f x + e\right )^{5} + {\left (a^{6} - 2 \, a^{5} b + a^{4} b^{2}\right )} f \tan \left (f x + e\right )^{3}\right )}}, \frac {12 \, a^{3} b f x \tan \left (f x + e\right )^{5} + 12 \, a^{4} f x \tan \left (f x + e\right )^{3} + 6 \, {\left (2 \, a^{3} b - 7 \, a b^{3} + 5 \, b^{4}\right )} \tan \left (f x + e\right )^{4} - 4 \, a^{4} + 8 \, a^{3} b - 4 \, a^{2} b^{2} + 4 \, {\left (3 \, a^{4} - a^{3} b - 7 \, a^{2} b^{2} + 5 \, a b^{3}\right )} \tan \left (f x + e\right )^{2} - 3 \, {\left ({\left (7 \, a b^{3} - 5 \, b^{4}\right )} \tan \left (f x + e\right )^{5} + {\left (7 \, a^{2} b^{2} - 5 \, a b^{3}\right )} \tan \left (f x + e\right )^{3}\right )} \sqrt {\frac {b}{a}} \arctan \left (\frac {{\left (b \tan \left (f x + e\right )^{2} - a\right )} \sqrt {\frac {b}{a}}}{2 \, b \tan \left (f x + e\right )}\right )}{12 \, {\left ({\left (a^{5} b - 2 \, a^{4} b^{2} + a^{3} b^{3}\right )} f \tan \left (f x + e\right )^{5} + {\left (a^{6} - 2 \, a^{5} b + a^{4} b^{2}\right )} f \tan \left (f x + e\right )^{3}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^4/(a+b*tan(f*x+e)^2)^2,x, algorithm="fricas")

[Out]

[1/24*(24*a^3*b*f*x*tan(f*x + e)^5 + 24*a^4*f*x*tan(f*x + e)^3 + 12*(2*a^3*b - 7*a*b^3 + 5*b^4)*tan(f*x + e)^4
 - 8*a^4 + 16*a^3*b - 8*a^2*b^2 + 8*(3*a^4 - a^3*b - 7*a^2*b^2 + 5*a*b^3)*tan(f*x + e)^2 - 3*((7*a*b^3 - 5*b^4
)*tan(f*x + e)^5 + (7*a^2*b^2 - 5*a*b^3)*tan(f*x + e)^3)*sqrt(-b/a)*log((b^2*tan(f*x + e)^4 - 6*a*b*tan(f*x +
e)^2 + a^2 + 4*(a*b*tan(f*x + e)^3 - a^2*tan(f*x + e))*sqrt(-b/a))/(b^2*tan(f*x + e)^4 + 2*a*b*tan(f*x + e)^2
+ a^2)))/((a^5*b - 2*a^4*b^2 + a^3*b^3)*f*tan(f*x + e)^5 + (a^6 - 2*a^5*b + a^4*b^2)*f*tan(f*x + e)^3), 1/12*(
12*a^3*b*f*x*tan(f*x + e)^5 + 12*a^4*f*x*tan(f*x + e)^3 + 6*(2*a^3*b - 7*a*b^3 + 5*b^4)*tan(f*x + e)^4 - 4*a^4
 + 8*a^3*b - 4*a^2*b^2 + 4*(3*a^4 - a^3*b - 7*a^2*b^2 + 5*a*b^3)*tan(f*x + e)^2 - 3*((7*a*b^3 - 5*b^4)*tan(f*x
 + e)^5 + (7*a^2*b^2 - 5*a*b^3)*tan(f*x + e)^3)*sqrt(b/a)*arctan(1/2*(b*tan(f*x + e)^2 - a)*sqrt(b/a)/(b*tan(f
*x + e))))/((a^5*b - 2*a^4*b^2 + a^3*b^3)*f*tan(f*x + e)^5 + (a^6 - 2*a^5*b + a^4*b^2)*f*tan(f*x + e)^3)]

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**4/(a+b*tan(f*x+e)**2)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]
time = 0.97, size = 179, normalized size = 1.06 \begin {gather*} -\frac {\frac {3 \, b^{3} \tan \left (f x + e\right )}{{\left (a^{4} - a^{3} b\right )} {\left (b \tan \left (f x + e\right )^{2} + a\right )}} + \frac {3 \, {\left (7 \, a b^{3} - 5 \, b^{4}\right )} {\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )\right )}}{{\left (a^{5} - 2 \, a^{4} b + a^{3} b^{2}\right )} \sqrt {a b}} - \frac {6 \, {\left (f x + e\right )}}{a^{2} - 2 \, a b + b^{2}} - \frac {2 \, {\left (3 \, a \tan \left (f x + e\right )^{2} + 6 \, b \tan \left (f x + e\right )^{2} - a\right )}}{a^{3} \tan \left (f x + e\right )^{3}}}{6 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^4/(a+b*tan(f*x+e)^2)^2,x, algorithm="giac")

[Out]

-1/6*(3*b^3*tan(f*x + e)/((a^4 - a^3*b)*(b*tan(f*x + e)^2 + a)) + 3*(7*a*b^3 - 5*b^4)*(pi*floor((f*x + e)/pi +
 1/2)*sgn(b) + arctan(b*tan(f*x + e)/sqrt(a*b)))/((a^5 - 2*a^4*b + a^3*b^2)*sqrt(a*b)) - 6*(f*x + e)/(a^2 - 2*
a*b + b^2) - 2*(3*a*tan(f*x + e)^2 + 6*b*tan(f*x + e)^2 - a)/(a^3*tan(f*x + e)^3))/f

________________________________________________________________________________________

Mupad [B]
time = 15.75, size = 2000, normalized size = 11.83 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(e + f*x)^4/(a + b*tan(e + f*x)^2)^2,x)

[Out]

(2*atan((2*tan(e + f*x)*(2320*a^10*b^11 - 400*a^9*b^12 - 5344*a^11*b^10 + 6112*a^12*b^9 - 3472*a^13*b^8 + 784*
a^14*b^7 - 64*a^15*b^6 + 192*a^16*b^5 - 192*a^17*b^4 + 64*a^18*b^3 + (256*a^15*b^10 - 1536*a^16*b^9 + 3584*a^1
7*b^8 - 3584*a^18*b^7 + 3584*a^20*b^5 - 3584*a^21*b^4 + 1536*a^22*b^3 - 256*a^23*b^2)/(2*a^2 - 4*a*b + 2*b^2)^
2))/((2*a^2 - 4*a*b + 2*b^2)*((2*(320*a^12*b^11 - 2048*a^13*b^10 + 5440*a^14*b^9 - 7680*a^15*b^8 + 6208*a^16*b
^7 - 3200*a^17*b^6 + 1728*a^18*b^5 - 1280*a^19*b^4 + 640*a^20*b^3 - 128*a^21*b^2))/(2*a^2 - 4*a*b + 2*b^2)^2 -
 400*a^9*b^10 + 1520*a^10*b^9 - 1904*a^11*b^8 + 624*a^12*b^7 + 384*a^13*b^6 - 224*a^14*b^5))))/(f*(2*a^2 - 4*a
*b + 2*b^2)) + ((tan(e + f*x)^2*(3*a + 5*b))/(3*a^2) - 1/(3*a) + (tan(e + f*x)^4*(2*a*b^2 + 2*a^2*b - 5*b^3))/
(2*a^3*(a - b)))/(f*(a*tan(e + f*x)^3 + b*tan(e + f*x)^5)) + (atan((((tan(e + f*x)*(400*a^9*b^12 - 2320*a^10*b
^11 + 5344*a^11*b^10 - 6112*a^12*b^9 + 3472*a^13*b^8 - 784*a^14*b^7 + 64*a^15*b^6 - 192*a^16*b^5 + 192*a^17*b^
4 - 64*a^18*b^3) + ((7*a - 5*b)*(-a^7*b^5)^(1/2)*(2048*a^13*b^10 - 320*a^12*b^11 - 5440*a^14*b^9 + 7680*a^15*b
^8 - 6208*a^16*b^7 + 3200*a^17*b^6 - 1728*a^18*b^5 + 1280*a^19*b^4 - 640*a^20*b^3 + 128*a^21*b^2 + (tan(e + f*
x)*(7*a - 5*b)*(-a^7*b^5)^(1/2)*(256*a^15*b^10 - 1536*a^16*b^9 + 3584*a^17*b^8 - 3584*a^18*b^7 + 3584*a^20*b^5
 - 3584*a^21*b^4 + 1536*a^22*b^3 - 256*a^23*b^2))/(4*(a^9 - 2*a^8*b + a^7*b^2))))/(4*(a^9 - 2*a^8*b + a^7*b^2)
))*(7*a - 5*b)*(-a^7*b^5)^(1/2)*1i)/(4*(a^9 - 2*a^8*b + a^7*b^2)) + ((tan(e + f*x)*(400*a^9*b^12 - 2320*a^10*b
^11 + 5344*a^11*b^10 - 6112*a^12*b^9 + 3472*a^13*b^8 - 784*a^14*b^7 + 64*a^15*b^6 - 192*a^16*b^5 + 192*a^17*b^
4 - 64*a^18*b^3) + ((7*a - 5*b)*(-a^7*b^5)^(1/2)*(320*a^12*b^11 - 2048*a^13*b^10 + 5440*a^14*b^9 - 7680*a^15*b
^8 + 6208*a^16*b^7 - 3200*a^17*b^6 + 1728*a^18*b^5 - 1280*a^19*b^4 + 640*a^20*b^3 - 128*a^21*b^2 + (tan(e + f*
x)*(7*a - 5*b)*(-a^7*b^5)^(1/2)*(256*a^15*b^10 - 1536*a^16*b^9 + 3584*a^17*b^8 - 3584*a^18*b^7 + 3584*a^20*b^5
 - 3584*a^21*b^4 + 1536*a^22*b^3 - 256*a^23*b^2))/(4*(a^9 - 2*a^8*b + a^7*b^2))))/(4*(a^9 - 2*a^8*b + a^7*b^2)
))*(7*a - 5*b)*(-a^7*b^5)^(1/2)*1i)/(4*(a^9 - 2*a^8*b + a^7*b^2)))/(400*a^9*b^10 - 1520*a^10*b^9 + 1904*a^11*b
^8 - 624*a^12*b^7 - 384*a^13*b^6 + 224*a^14*b^5 - ((tan(e + f*x)*(400*a^9*b^12 - 2320*a^10*b^11 + 5344*a^11*b^
10 - 6112*a^12*b^9 + 3472*a^13*b^8 - 784*a^14*b^7 + 64*a^15*b^6 - 192*a^16*b^5 + 192*a^17*b^4 - 64*a^18*b^3) +
 ((7*a - 5*b)*(-a^7*b^5)^(1/2)*(2048*a^13*b^10 - 320*a^12*b^11 - 5440*a^14*b^9 + 7680*a^15*b^8 - 6208*a^16*b^7
 + 3200*a^17*b^6 - 1728*a^18*b^5 + 1280*a^19*b^4 - 640*a^20*b^3 + 128*a^21*b^2 + (tan(e + f*x)*(7*a - 5*b)*(-a
^7*b^5)^(1/2)*(256*a^15*b^10 - 1536*a^16*b^9 + 3584*a^17*b^8 - 3584*a^18*b^7 + 3584*a^20*b^5 - 3584*a^21*b^4 +
 1536*a^22*b^3 - 256*a^23*b^2))/(4*(a^9 - 2*a^8*b + a^7*b^2))))/(4*(a^9 - 2*a^8*b + a^7*b^2)))*(7*a - 5*b)*(-a
^7*b^5)^(1/2))/(4*(a^9 - 2*a^8*b + a^7*b^2)) + ((tan(e + f*x)*(400*a^9*b^12 - 2320*a^10*b^11 + 5344*a^11*b^10
- 6112*a^12*b^9 + 3472*a^13*b^8 - 784*a^14*b^7 + 64*a^15*b^6 - 192*a^16*b^5 + 192*a^17*b^4 - 64*a^18*b^3) + ((
7*a - 5*b)*(-a^7*b^5)^(1/2)*(320*a^12*b^11 - 2048*a^13*b^10 + 5440*a^14*b^9 - 7680*a^15*b^8 + 6208*a^16*b^7 -
3200*a^17*b^6 + 1728*a^18*b^5 - 1280*a^19*b^4 + 640*a^20*b^3 - 128*a^21*b^2 + (tan(e + f*x)*(7*a - 5*b)*(-a^7*
b^5)^(1/2)*(256*a^15*b^10 - 1536*a^16*b^9 + 3584*a^17*b^8 - 3584*a^18*b^7 + 3584*a^20*b^5 - 3584*a^21*b^4 + 15
36*a^22*b^3 - 256*a^23*b^2))/(4*(a^9 - 2*a^8*b + a^7*b^2))))/(4*(a^9 - 2*a^8*b + a^7*b^2)))*(7*a - 5*b)*(-a^7*
b^5)^(1/2))/(4*(a^9 - 2*a^8*b + a^7*b^2))))*(7*a - 5*b)*(-a^7*b^5)^(1/2)*1i)/(2*f*(a^9 - 2*a^8*b + a^7*b^2))

________________________________________________________________________________________